import java.util.Scanner;

/**
 * @author vivi
 * @description
 * @date 2024/5/21
 */
public class demo1 {
    public static long change (String t) {
        StringBuffer stringBuffer = new StringBuffer(t);
        for (int i = t.length() - 2; i >= 0; i--) {
            stringBuffer.append(t.charAt(i));
        }
        return Long.parseLong(stringBuffer.toString());
    }
    public static boolean isPrime(long x) {
        if (x < 2) {
            return false;
        }else {
            for (int i = 2; i < Math.sqrt(x); i++) {
                if (x % i == 0) {
                    return false;
                }
            }
        }
        return true;
    }
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        String t = scanner.next();
        long x = change(t);
        if (isPrime(x)) {
            System.out.println("prime");
        }else {
            System.out.println("noprime");
        }
    }
}
